package com.hainatong.jcmvvmbase.mainhome.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseDataBindingHolder;
import com.hainatong.jcmvvmbase.R;
import com.hainatong.jcmvvmbase.databinding.ItemLinyongGoodsViewBinding;
import com.hainatong.jcmvvmbase.mainhome.entity.EquipmentRecordBean;
import org.jetbrains.annotations.NotNull;

public class EquipmentRecordAdapter extends BaseQuickAdapter<EquipmentRecordBean, BaseDataBindingHolder<ItemLinyongGoodsViewBinding>>
{
    public EquipmentRecordAdapter()
    {
        super(R.layout.item_linyong_goods_view);
    }

    @Override
    protected void convert(@NotNull BaseDataBindingHolder<ItemLinyongGoodsViewBinding> bindingHolder, EquipmentRecordBean recordBean)
    {
        ItemLinyongGoodsViewBinding binding = bindingHolder.getDataBinding();
        if( binding != null )
        {
            binding.setRecordBean( recordBean );
            binding.executePendingBindings();
        }
    }
}
